import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
// 查询种植情况列表
export function listPlant(query) {
  return request({
    url: '/ap/plant/list',
    method: 'get',
    params: query
  })
}

// 查询种植情况详细
export function getPlant(id) {
  return request({
    url: '/ap/plant/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增种植情况
export function addPlant(data) {
  return request({
    url: '/ap/plant',
    method: 'post',
    data: data
  })
}

// 修改种植情况
export function updatePlant(data) {
  return request({
    url: '/ap/plant',
    method: 'put',
    data: data
  })
}

// 删除种植情况
export function delPlant(id) {
  return request({
    url: '/ap/plant/' + id,
    method: 'delete'
  })
}


// 查询农户下拉树结构
export function farmerTreeSelect() {
  return request({
    url: '/ap/farmer/farmerTree',
    method: 'get'
  })
}
